<html>
<head>
<title>Video Mobile</title>
<meta content="text/html; charset=utf-8" http-equiv="content-type">
<script language="javascript">

var img = new Image();
var imgObj;
var cade = JSInterface.ruta();//gup( 'cad' );

function gup( name ){ 

	var regexS = "[\\?&]"+name+"=([^&#]*)"; 
	var regex = new RegExp ( regexS ); 
	var tmpURL = window.location.href; 
	var results = regex.exec( tmpURL ); 
	if( results == null ) 
	return""; 
else 
	return results[1]; 
} 

//http://www.foo.com/index.html?cad=http://201.230.243.88:1066/tmpfs/auto.jpg?
//var frank_param = gup( 'cad' );
	
function preload(cadena)
{
	img.src= cadena +new Date;
}

function changesrc()
{
	img1.src=img.src;
	preload(cadena);
	setTimeout(changesrc,3500);
}

function update()
{	
	var cadena = JSInterface.ruta();//gup( 'cad' );
	imgObj = document.getElementById('img1');
	
	imgObj.src = img.src;
	img.src = cadena + (new Date()).getTime();
}

function takeError()
{	
	var cadena = JSInterface.ruta();//gup( 'cad' );
	img.src = cad + (new Date()).getTime();
}

function startonload(cadena)
{
	img.src = cadena + (new Date()).getTime();
	img.onerror=takeError;
	img.onload=update;
}

function load(cadena)
{
	//cadena = gup( 'cad' );
	cadena = JSInterface.ruta();
	
	if (navigator.appName.indexOf("Microsoft IE Mobile") != -1)
	{
		preload(cadena);
		changesrc();
		return;
	}
	startonload(cadena);
}


</script>
</head>
<body onload="load(cade)">
<form name="form1" method="get" target="test">
</form>
<center>
<p><img id="img1" border="0" src=cade></p>
</center>
<iframe name="test" style="none" width="0" height="0"></iframe>
</body>
</html>